<template>



<div class="fullmask" v-if="loading">
  
 
  <van-loading size="24px" vertical>加载中...</van-loading>
</div>



  <router-view></router-view>
</template>

<script>
import { SiteStore } from '@/stores/site'
export default {
  data() {
    return {
      goods: {

      },
    };
  },

  computed:{
    loading(){
    const Site = SiteStore()

    return Site.loading
     
      
    }

  },


  mounted() {

    var code = this.getUrlKey("code");

    console.log(code)


    return ;

    this.updateUrl();

  },
  methods: {

    updateUrl(newPage) {
    let   url = window.location.href
        var code = this.getUrlKey("code");
      url=  url.replace("&code=" +code,"")
      history.pushState(null, null,url);
    },

    getUrlKey(name, url = "") {
      if (!url) {
        url = window.location.href
      }
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null

    }
  },
};
</script>

<style lang="scss">

.fullmask{

position: fixed;
width: 100vw;
height: 100vh;
z-index: 99999;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;


}
</style>
